package org.vuzya.motivateme.core;

import org.vuzya.motivateme.R;

import android.database.Cursor;
import android.view.View;
import android.widget.SimpleCursorAdapter.ViewBinder;
import android.widget.TextView;

public class BusinessListBinder implements ViewBinder {
	
	@Override
	public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
		switch (view.getId()) {
//		case R.id.business_list_item_title:
//			view.setTag(cursor.getLong(cursor.getColumnIndex(Businesses._ID)));
//			break;
		case R.id.business_list_item_finishdate:
			if(cursor.isNull(columnIndex)){
				TextView tv = (TextView)view;
				tv.setText(R.string.business_list_item_not_finished_yet);
				return true;
			}
		}
		return false;
	}

}
